package com.telnikoff.colaboration;

abstract public class Colaboration 
{
	private static Colaborator colaborator = new DefaultColaborator();
	private static ExceptionHandler exceptionHandler = new DefaultExceptionHandler();
	
	public static void setExceptionHandler(ExceptionHandler eh)
	{
		exceptionHandler = eh;
	}
	
	public static void setColaborator(Colaborator c)
	{
		colaborator = c;
	}
	
	public static Colaboration newInstance()
	{
		return new Colaboration(){};
	}
	
	public void colaborate(Collector c)
	{
		colaborator.colaborate(c);
	}

}
